﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common;

namespace BusinessLayer
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IFaultService" in both code and config file together.
    [ServiceContract]
    public interface IFaultService
    {
        [OperationContract]
        string GenerateNumber();

        [OperationContract]
        bool FaultLogin(string username,string Token, string pin);

        [OperationContract]
        void FileFaultReport(string username, int ProductID,string details);

        [OperationContract]
        IEnumerable<Common.UserProductFault> ListOfItemFaults(int ProductID, DateTime startdate, DateTime endDate, string username);

        [OperationContract]
        IEnumerable<UserProductFault> getAllFaults();
        
        [OperationContract]
        UserProductFault getFaultByID(int id);

        [OperationContract]
        UserProductFault getFaultByIDOrderID(int id, Guid orderID);

        [OperationContract]
        IEnumerable<Fault> GetAllFaultStatus();
        
        [OperationContract]
        Fault getFaultStatusByID(int id);

        [OperationContract]
        void addFaultLog(FaultLog fault);

        [OperationContract]
        void UpdateFault(UserProductFault fault);

        [OperationContract]
        string CreatePDFFault(UserProductFault fault);
    
    }
}
